#include "album.h"

Album::Album(QString name)
{
    this->name = name;
    this->songs = NULL;
}

QList < Song* > * Album::getSongs()
{
    return songs;
}

void Album::setSongs(QList < Song* > * newSongs)
{
    if(songs == NULL){
        songs = new QList < Song* >();
    }

    songs = newSongs;
}

QString Album::getName()
{
    return name;
}

QString Album::getName() const
{
    return name;
}

Artist * Album::getArtist()
{
    return artist;
}

void Album::setArtist(Artist * artist)
{
    this->artist = artist;
}

bool Album::operator==(const Album &other) const
{
    if(this->getName() == other.getName()){
        return true;
    }else{
        return false;
    }
}

bool Album::operator==(const QString &other) const
{
    if(this->getName() == other){
        return true;
    }else{
        return false;
    }
}
